//
//  JYJCycleImageCollectionViewCell.m
//  HappyListen
//
//  Created by 冀永金 on 16/8/29.
//  Copyright © 2016年 冀永金. All rights reserved.
//

#import "JYJCycleImageCollectionViewCell.h"
#import "UIImageView+WebCache.h"
#import "JYJBannerListModel.h"
#import "JYJTAMacro.h"
@interface JYJCycleImageCollectionViewCell ()
@property (nonatomic, strong) UIImageView *image;
@end
@implementation JYJCycleImageCollectionViewCell
- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        self.image = [[UIImageView alloc]init];
        [self.contentView addSubview:_image];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    self.image.frame = self.contentView.bounds;
}
- (void)setListModel:(JYJBannerListModel *)listModel {
    _listModel = listModel;
    [self.image sd_setImageWithURL:[NSURL URLWithString:listModel.content_img] placeholderImage:PLACEHOLDERIMAGE];
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
